<div class="weChat" id="weChat">
    <modal :show="true">
        <div class="modal-header">
            <a href="javascript:;" class="close" @click="hide()">
                <span>&times;</span>
            </a>
            <span class="modal-title" v-if="name">{{$t('basic.setWeChat.changeText')}}</span>
            <span class="modal-title" v-if="!name">{{$t('basic.setWeChat.bindingText')}}</span>
        </div>
        <validator :rules="rules" :parent="_self">
            <form name="form" action="javascript:;">
                <div class="modal-body">
                    <div class="col-row">
                        <div class="col-label">
                            <label>{{$t('basic.setWeChat.type')}}</label>
                        </div>
                        <div class="col-input">
                            <select v-model="form.type" disabled>
                                <option v-for="item in list" :value="item.value">{{item.desc}}</option>
                            </select>
                            <div class="ui-tip"></div>
                        </div>
                    </div>
                    <div class="col-row">
                        <div class="col-label">
                            <label>{{$t('basic.setWeChat.wechatNo')}}</label>
                        </div>
                        <div class="col-input">
                            <input id="weChatNo" ref="input" name="weChatNo" type="text" :placeholder="$t('basic.setWeChat.tip')"
                                v-model="form.weChatNo">
                            <div class="ui-tip"></div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="ui-btn" v-if="!loading" type="submit" @click="submit">{{$t('basic.setWeChat.'+
                        (bingding ? 'change' : 'binding'))}}</button>
                    <button class="ui-btn" v-if="loading" disabled>{{$t('basic.setWeChat.'+ (bingding ? 'change' :
                        'binding'))}}...</button>
                    <button type="button" class="ui-btn ui-btn--default" @click="hide()">{{$t('basic.setWeChat.cancel')}}</button>
                </div>
            </form>
        </validator>
    </modal>
</div>